package com.demo.designmode.strategy;

/**
 * @Author: jxm
 * @Description: 策略模式 测试
 * @Date: 2023-12-11 10:42
 * @Version: 1.0
 */
public class Client {

    public static void main(String[] args) {
        //春节来了，使用春节促销活动
        SalesMan salesMan = new SalesMan(new StrategyA());
        salesMan.salesManShow();

        System.out.println("--------------");

        //中秋节
        SalesMan salesMan1 = new SalesMan(new StrategyB());
        salesMan1.salesManShow();

        System.out.println("--------------");

        //中秋节
        salesMan.setStrategy(new StrategyC());
        salesMan.salesManShow();

    }
}
